﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace Webcar.Entitys
{
    public static class WebcarDataProvider
    {
        const string WebcarDataContext = "WebcarDataContext";

        public static WebcarContext DB
        {
            get
            {
                //return new WebcarContext();
                if (HttpContext.Current.Items[WebcarDataContext] == null)
                    HttpContext.Current.Items[WebcarDataContext] = new WebcarContext();
                return (WebcarContext)HttpContext.Current.Items[WebcarDataContext];
            }
        }

    }
}
